<!-- 维保工单详情 -->
<template>
	<view class="page">
		<cu-custom bgColor="bg-white" :isBack="true">
			<block style="color: #777777;font-size: 48rpx;" slot="content">维保工单详情</block>
		</cu-custom>
		<view class="content">
			<ul>
				<li>
					<text>隐患图片：</text>
					<image :src="img"></image>
				</li>
				<li>
					<text>隐患名称：{{name}}</text>
				</li>
				<li>
					<text>执行时间：{{time}} </text>
				</li>
				<li>
					<text>业主名称：{{yzmc}} </text>
				</li>
				<li>
					<text>隐患描述：{{desc}}</text>
				</li>
				<li>
					<text>所属区域：{{area}} </text>
				</li>
				<li>
					<text>隐患地址：{{address}} </text>
				</li>
			</ul>
		</view>
	</view>
</template>

<script>
	export default {
		onLoad(option) {
			// 封装参数
			let params = {
				"ucId": option.ucId
			}
			let that = this
			// 请求数据
			let app = getApp()
			app.globalData.request({
				url: 'wx/workOrder/getInWorkOrderVo',
				data: {
					...params
				}
			}).then(function(res) {
				console.info(res)
				that.img = res.data.data.abnormalPic
				that.name = res.data.data.name
				that.time = res.data.data.reportTime
				that.yzmc = res.data.data.enterpriseName
				that.desc = res.data.data.name
				that.area = res.data.data.regionName
				that.address = res.data.data.regionName

			}).catch(function(e) {

			})
		},
		data() {
			return {
				img: 'http://5b0988e595225.cdn.sohucs.com/images/20180803/5a1baccb0c7d4318b7226e52a1f3fe04.jpeg',
				name: '隐患名称',
				time: '2022-02-22 19:30:24',
				yzmc: '天马商场A座',
				desc: '负一A区电梯前点型烟感发出火情',
				area: '天马商场',
				address: '负一A区电梯前'
			}
		},
		methods: {

		}
	}
</script>

<style scoped>
	page {
		width: 100vw;
		position: relative;
	}

	.content {
		margin-top: 24rpx;
		background-color: #FFFFFF;
	}

	li {
		height: 94rpx;
		margin-left: 24rpx;
		margin-right: 24rpx;
		position: relative;
	}

	ul li:first-child {
		width: 100%;
		height: 100%;
		display: flex;
		justify-content: flex-start;
		position: relative;
		align-items: center;
		padding: 26rpx 0;
	}

	li image {
		display: block;
		width: 180px;
		height: 180px;
		margin-right: 20px;
	}

	li text {
		font-size: 24rpx;
		color: #777777;
		letter-spacing: 0.39px;
		line-height: 94rpx;
	}

	li::after {
		content: ''; // 必须
		position: absolute;
		left: 2rpx;
		bottom: 0;
		right: 2rpx;
		height: 1px;
		background-color: #dcdcdc;
	}
</style>
